home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- #include "stereo.h"
-
- /*
- * Re-defined in on_stereo; in the future, should be initialized by a
- * call to getgdesc().
- */
- int YMAXSTEREO = (-1);
- int YOFFSET = (-1);
-
- static int old_monitor_mode = (-1);
-
- void
- stereo_on(int primary)
- {
- if (primary == STR_RECT)
- YOFFSET = 532;
- else if (primary == STR_BOT)
- YOFFSET = 532;
- else if (primary == STR_TOP)
- YOFFSET = -532;
-
- YMAXSTEREO = 491;
-
- /* If stereo is supported... */
- if (getgdesc(GD_STEREO))
- {
- /* save old monitor mode (normally HZ60) */
- old_monitor_mode = getmonitor();
-
- if (old_monitor_mode != primary)
- {
- if(!getenv ("DISABLE_SETMON"))
- setmonitor(primary);
- if (old_monitor_mode == STR_TOP)
- old_monitor_mode = STR_BOT;
- }
- }
- }
-
- void
- stereo_off()
- {
- int mousey;
-
- if (old_monitor_mode != (-1) && old_monitor_mode != STR_RECT)
- {
- setmonitor(old_monitor_mode);
- mousey = getvaluator(MOUSEY);
- }
- }
-